<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //es6新增 Set对象   存储唯一的值
        //数组去重
        var arr=[1,1,2,2,3,3,3,4];
        var s=new Set(arr);
        console.log(Array.from(s));//Set---数组  Array.from()
    </script>
</body>
</html>